package com.javachmapi.springbootfreemarker.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * create by 宋利军
 */
@Controller
public class UserController {

    @RequestMapping("/index")
    public String index(Map<String, Object> map) {
        map.put("nickname", "宋利军");
        map.put("username", "javachmapi");
        map.put("password", "123456");
        map.put("sex", "0");
        List<String> list = new ArrayList<>();
        list.add("学习");
        list.add("打游戏");
        list.add("撸代码");
        map.put("hobbys", list);
        return "index";
    }
}
